package cn.jly.spring.boot.cloud.beans;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author lanyangji
 * @description 测试联合主键 @Embeddedable 和 @EmbeddedId 方式
 * @date 2020/12/9 下午 5:01
 */
@Entity
@Table(name = "tbl_user_info2")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UserInfo2 {
    private Integer age;

    @EmbeddedId
    private UserInfoId2 UserInfoId2;
}
